<script setup>
// import HelloWorld from './components/HelloWorld.vue'
// import HelloWorld2 from '@/components/HelloWorld.vue'
// 注： n-message-provider 和 n-dialog-provider 同时出现时, n-message-provider 要在外层
import { NDialogProvider, NMessageProvider }  from 'naive-ui'
</script>

<template>
  <n-config-provider :theme="theme"
      :locale="locale" :date-locale="dateLocale">
  <n-theme-editor >
  <n-layout style="font-size:16px;height:100%">
    <n-message-provider>
    <n-dialog-provider>
        <inner-app></inner-app>
    </n-dialog-provider>
    </n-message-provider>
  </n-layout>
  </n-theme-editor>
  </n-config-provider>
</template>

<style lang="scss">
@import './assets/css/global.scss';
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100%;
}
.n-config-provider{
  height: 100%;
}
</style>

<script>
// NThemeEditor 是 naive 主题编辑器，
import { NConfigProvider, createTheme, inputDark, datePickerDark,
   darkTheme, useOsTheme, NLayout, NThemeEditor } from 'naive-ui'
import { zhCN, dateZhCN } from 'naive-ui'
import InnerApp from './InnerApp.vue';

export default {
  components: { NConfigProvider, InnerApp, NLayout, NThemeEditor },
  data () {
    return {
      // theme: createTheme([inputDark, datePickerDark]),
      theme: null, //  darkTheme, useOsTheme()
      osThemeRef: useOsTheme(),
      locale: zhCN,
      dateLocale: dateZhCN,
    }
  },
  mounted () {
  },
}
</script>